﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="good_type_edit.aspx.cs" Inherits="SF.Ucenter.admin.good.good_type_edit" %>

<%@ Import Namespace="SF.Common" %>

<!DOCTYPE html>
<%--商品类别 添加 编辑页面--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>编辑类别</title>
    <link href="../../scripts/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" src="../../scripts/webuploader/webuploader.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    <style type="text/css">
        .showimgs {
            padding-top: 5px;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            $(".upload-img").InitUploader({ filesize: "10240", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "gif,jpg,png,bmp,rar,zip,doc,xls,txt" });
        });
    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="good_type_list.aspx" class="back"><i></i><span>返回列表页</span></a>
            <a href="../First.aspx" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <a href="good_type_list.aspx"><span>商品类别</span></a>
            <i class="arrow"></i>
            <span>编辑分类</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a href="javascript:;" class="selected">基本信息</a></li>
                        <li><a href="javascript:;">分类商品字段定义</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="tab-content">
            <dl id="dlGoodsTypeId">
                <dt>所属类型</dt>
                <dd>
                    <div class="rule-single-select">
                        <asp:DropDownList ID="ddlGoodsTypeId" runat="server" datatype="*" sucmsg=" " AutoPostBack="true" OnSelectedIndexChanged="ddlGoodsTypeId_SelectedIndexChanged" Enabled="false"></asp:DropDownList>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>所属父类别</dt>
                <dd>
                    <div class="rule-single-select">
                        <asp:DropDownList ID="ddlParentId" runat="server"></asp:DropDownList>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>是否启用</dt>
                <dd>
                    <div class="rule-single-checkbox">
                        <asp:CheckBox ID="cbIsLock" runat="server" Checked="True" />
                    </div>
                    <span class="Validform_checktip">*启用则显示在商城中</span>
                </dd>
            </dl>
            <dl>
                <dt>排序数字</dt>
                <dd>
                    <asp:TextBox ID="txtSortId" runat="server" CssClass="input small" datatype="n" sucmsg=" ">99</asp:TextBox>
                    <span class="Validform_checktip">*数字，越小越向前</span>
                </dd>
            </dl>
            <%--<dl>
                <dt>类别编号</dt>
                <dd>
                    <asp:TextBox ID="txtTypeNum" runat="server" CssClass="input normal" datatype="*1-50" sucmsg=" "></asp:TextBox>
                    <span class="Validform_checktip">*类别编号数字和字母</span></dd>
            </dl>--%>
            <dl>
                <dt>类别名称</dt>
                <dd>
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="input normal" datatype="*1-100" sucmsg=" "></asp:TextBox>
                    <span class="Validform_checktip">*类别中文名称，100字符内</span></dd>
            </dl>
            <%--<dl>
                <dt>备注</dt>
                <dd>
                    <asp:TextBox ID="txtSeoDescription" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">255个字符以内</span>
                </dd>
            </dl>--%>
            <dl>
                <dt>封面图片</dt>
                <dd>
                    <asp:TextBox ID="txtImgUrl" runat="server" CssClass="input normal upload-path" ReadOnly="true" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="imgHeadPic" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
        </div>

        <div class="tab-content" style="display: none">
            <!--工具栏-->
            <div id="floatHead" class="toolbar-wrap">
                <div class="toolbar">
                    <div class="box-wrap">
                        <div class="l-list">
                            <ul class="icon-list">
                                <li>
                                    <asp:LinkButton ID="btnAddField" runat="server" CssClass="save" OnClick="btnAddField_Click"><i></i><span>新增</span></asp:LinkButton>
                                </li>
                                <li>
                                    <asp:LinkButton ID="btnDeleteField" runat="server" CssClass="save" OnClick="btnDeleteField_Click"><i></i><span>删除</span></asp:LinkButton>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!--/工具栏-->

            <!--列表-->
            <%--<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="rptList_ItemDataBound">--%>
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                        <tr>
                            <th width="5%">选择</th>
                            <th align="left" width="15%">字段编码</th>
                            <th align="left" width="15%">字段名称</th>
                            <th align="left" width="15%">字段类型</th>
                            <th align="left" width="15%">字段长度</th>
                            <th align="left" width="15%">字段精度</th>
                            <th align="left" width="20%">字段描述</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td align="center">
                            <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" Style="vertical-align: middle;" />
                            <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
                        </td>
                        <td>
                            <asp:Literal ID="LitFirst" runat="server"></asp:Literal>
                            <asp:TextBox ID="txtFieldCode" runat="server" Text='<%#Eval("fieldCode")%>' /></td>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFildName" runat="server" Text='<%#Eval("fieldName")%>' /></td>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFieldType" runat="server" Text='<%#Eval("fieldType")%>' /></td>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFieldLength" runat="server" Text='<%#Eval("fieldLength")%>' onkeydown="return checkNumber(event);" /></td>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFieldPrecision" runat="server" Text='<%#Eval("fieldPrecision")%>' onkeydown="return checkNumber(event);" />
                        </td>
                        <td>
                            <asp:TextBox ID="txtFieldRemark" runat="server" Text='<%#Eval("fieldRemark")%>' /></td>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"7\">暂无记录</td></tr>" : ""%>
        </table>
                </FooterTemplate>
            </asp:Repeater>
            <!--/列表-->
        </div>
        <!--/内容-->
        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-list">
                <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btn" OnClick="btnSubmit_Click" />
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
            <div class="clear"></div>
        </div>
        <!--/工具栏-->

    </form>
</body>
</html>
